# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Simon Sapin <simon dot sapin at exyr dot org>
# Contributor: Kyle Keen <keenerd@gmail.com>

pkgname=python-text-unidecode
pkgver=1.3
pkgrel=9
pkgdesc="The most basic Text::Unidecode port"
url="https://github.com/kmike/text-unidecode"
license=('PerlArtistic')
arch=('any')
depends=('python')
makedepends=('python-setuptools')
checkdepends=('python-pytest-runner')
source=("https://pypi.io/packages/source/t/text-unidecode/text-unidecode-$pkgver.tar.gz")
sha512sums=('aeaf0e79bd0545ca7a4fe700d5a7dac1d5900841fcfe8a5a568c84ba7d3bee5f75eaac0531f4a01d689a550ac5bc7e1acaeb8132293f220db8387fae2eb6a150')

build() {
  cd "$srcdir"/text-unidecode-$pkgver
  python setup.py build
}

check() {
  cd "$srcdir"/text-unidecode-$pkgver
  python setup.py pytest
}

package() {
  cd text-unidecode-$pkgver
  python3 setup.py install --root="$pkgdir" --optimize=1
}
